<!DOCTYPE html> 
<html> 

<head>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />

  <title>NYP mobile</title>
  
  <!-- Style sheets -->
  <link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.3.0-beta.1.min.css" />
  <link rel="stylesheet" type="text/css" href="css/add2home.css" />
  <style type="text/css">
    iframe {background:white; width:100%;}
    .rssBody ul, .rssRow { margin-left: 0; padding-left: 0; list-style: none; }
    .rssRow h4 { margin: 0; font-size: 1.8em; letter-spacing: -1px; }
    .rssRow h4 a { text-decoration: none; }
    .rssRow h4 a:hover { color: darkblue; }
    .rssRow div { font-size: 0.9em; color: #999; }	
  </style>
    
  <!-- PhoneGap -->
  <script src="phonegap.js"></script>
  <script src="childbrowser.js"></script>

  <!-- JQuery and Javascript -->
  <script src="js/jquery-1.9.0.min.js"></script>
  <script>
    $(document).bind("mobileinit", function () {
	  $.mobile.defaultPageTransition = 'fade';
      $.mobile.loader.prototype.options.text = "Loading...";
      $.mobile.loader.prototype.options.textVisible = true;
	  $.mobile.page.prototype.options.theme  = "c";
	});
  </script>
  <script src="js/jquery.mobile-1.3.0-beta.1.min.js"></script>
  <script src="js/jquery.zrssfeed.js"></script>
  <script src="js/add2home.js"></script>
  
  <!-- Apple iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes" />

  <link rel="apple-touch-icon-precomposed" sizes="57x57" href="images/icons/57.png" />
  <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/icons/72.png" />
  <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/icons/114.png" />
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/icons/144.png" />
  <link rel="apple-touch-icon-precomposed" href="icon.png" />
  
  <link rel="apple-touch-startup-image" href="images/splash/320x460.png" />
  
  <!-- Google Analytics -->
  <script>
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-6649940-1']);
    _gaq.push(['_trackPageview']);
    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>
  
  <!-- Facebook -->
  <meta property="og:title" content="NYP mobile" />
  <meta property="og:url" content="http://www.nyp.mobi" />
  <meta property="og:image" content="http://www.northyorkshire.police.uk/nypd/m/icon.png" />
  <meta property="og:site_name" content="NYP mobile" />
  <meta property="fb:page_id" content="137302061069" />

</head> 

<body>

<div data-role="page" id="home">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>NYP mobile</h1>
    <a href="#help" data-icon="info" data-iconpos="notext" data-transition="pop" data-rel="dialog" class="ui-btn-right">About</a>
  </div>
  <div data-role="content">
    <ul data-role="listview" data-inset="true">
      <li data-role="list-divider">North Yorkshire Police</li>
      <li><a href="#news"><img src="images/news.png" class="ui-li-icon">Latest news</a></li>
      <li><a href="html/contact.html"><img src="images/contact.png" class="ui-li-icon">Contact the police</a></li>
      <li><a href="html/crime-prevention.html"><img src="images/crime-prevention.png" class="ui-li-icon">Crime prevention advice</a></li>
	  <li><a href="html/work.html"><img src="images/work.png" class="ui-li-icon">Recruitment</a></li>
    </ul>
    <ul data-role="listview" data-inset="true">
      <li data-role="list-divider">Local information</li>
      <li><a href="html/safer-neighbourhoods.html"><img src="images/safer-neighbourhoods.png" class="ui-li-icon">Safer Neighbourhood Teams</a></li>
	  <li><a href="html/meet-the-team.html"><img src="images/officers.png" class="ui-li-icon">Your local officers</a></li>
	  <li><a href="html/maps.html"><img src="images/maps.png" class="ui-li-icon">Crime maps</a></li>
	  <li><a href="html/alerts.html"><img src="images/alerts.png" class="ui-li-icon">Local alerts</a></li>
    </ul>
    <ul data-role="listview" data-inset="true">
      <li data-role="list-divider">More from NYP</li>
      <li><a href="html/facebook.html"><img src="images/facebook.png" class="ui-li-icon">Facebook</a></li>
	  <li><a href="html/survey.html"><img src="images/survey.png" class="ui-li-icon">Surveys</a></li>
      <li><a href="#twitter"><img src="images/twitter.png" class="ui-li-icon">Twitter</a></li>
	  <li><a href="html/webchats.html"><img src="images/webchats.png" class="ui-li-icon">Webchats</a></li>
	  <li><a href="html/videos.html"><img src="images/youtube.png" class="ui-li-icon">Videos</a></li>
    </ul>
    <a href="http://www.northyorkshire.police.uk/" rel="external" data-theme="e" data-role="button" data-icon="grid">View full site</a>
	</div>
  <div data-role="footer" data-id="foo1" data-position="fixed">
	<div data-role="navbar">
	  <ul>
        <li><a href="#news">News</a></li>
        <li><a href="#twitter">Twitter</a></li>
        <li><a href="html/contact.html">Contact</a></li>
      </ul>
    </div>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="news">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Latest news</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">
    <ul data-role="listview" data-inset="true" id="articleList" data-filter="true">
    <li data-role="list-divider">Forcewide news</li>
    
    <script type="text/javascript">
      // forked from rotsuya's "RSS Reader with jQuery Mobile" http://jsdo.it/rotsuya/411c
      /* configuration */
      var maxLength = 10;
      /* writing HTML */
      for(var i=1; i<=maxLength; i++){
      document.write(
        '<li id="news' + i + '"><a href="#article' + i + '" id="link' + i + '">&nbsp;</a></li>'
      );
      }
      document.write(
      '    </ul>' +
      '    <ul data-role="listview" data-inset="true">' +
      '    <li data-role="list-divider">More news</li>' +
      '    <li><a href="#newsletters"><img src="images/email.png" class="ui-li-icon">Email newsletters</a></li>' +
	  '    <li><a href="html/ringmaster.html"><img src="images/ringmaster.png" class="ui-li-icon">Ringmaster</a></li>' +
	  '    <li><a href="#twitter"><img src="images/twitter.png" class="ui-li-icon">Twitter</a></li>' +
      '    </ul>' +
      '  </div>' +
      '</div>'
      );
      for(i=1; i<=maxLength; i++){
      document.write(
        '<div data-role="page" id="article' + i + '">' +
        '  <div data-role="header" data-position="fixed" data-position="inline">' +
        '    <a href="#news" data-role="button" data-icon="arrow-l" data-back="true">Back</a>' +
        '    <h1 id="articleHeader' + i + '">&nbsp;</h1>' +
        '    <a href="#" id="openButton' + i + '" data-role="button" data-icon="plus"' +
        '      class="ui-btn-right" rel="external">Read</a>' +
        '  </div>' +
        '  <div data-role="content">' +
        '    <div id="articleContent' + i + '" class="articleContent"></div>' +
        '    <div data-role="controlgroup" data-type="horizontal">' +
        '      <a href="#article' + String(i-1) + '" data-role="button" data-icon="arrow-l"' +
        '        data-inline="true" class="prevButton">Previous</a>' +
        '      <a href="#article' + String(i+1) + '" data-role="button" data-icon="arrow-r"' +
        '        data-inline="true" class="nextButton" data-iconpos="right">Next</a>' +
        '    </div>' +
        '  </div>' +
        '</div>'
      );
      }
      /* JSONP */
      $(function(){
      getOnlineFeed('http://www.northyorkshire.police.uk/rss-news');
      });
      /* functions */
      var listEntries = function(json) {
      if (!json.responseData.feed.entries) return false;
      $('#widgetTitle').text(json.responseData.feed.title);
      var articleLength =json.responseData.feed.entries.length;
      articleLength = (articleLength > maxLength) ? maxLength : articleLength;
      for (var i = 1; i <= articleLength ; i++) {
        var entry = json.responseData.feed.entries[i-1];
        $('#link' + i).text(entry.title);
        $('#articleHeader' + i).text(entry.title);
        $('#openButton' + i).attr('href', entry.link);
        $('#articleContent' + i).append(entry.content);
      }
      $('#article1 .prevButton').remove();
      $('#article' + articleLength + ' .nextButton').remove();
      if (articleLength < maxLength) {
        for (i = articleLength + 1; i <= maxLength; i++) {
        $('#news' + i).remove();
        $('#article' + i).remove();
        }
      }
      };
      var getOnlineFeed = function(url) {
      var script = document.createElement('script');
      script.setAttribute('src', 'http://ajax.googleapis.com/ajax/services/feed/load?callback=listEntries&hl=ja&output=json-in-script&q='
                + encodeURIComponent(url)
                + '&v=1.0&num=' + maxLength);
      script.setAttribute('type', 'text/javascript');
      document.documentElement.firstChild.appendChild(script);
      };
  </script>

<div data-role="page" data-add-back-btn="true" id="newsletters">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Newsletters</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">
	<p>You can subscribe to an email newsletter from North Yorkshire Police. We will only email you a maximum of once a day, usually at about 6pm, and you can unsubscribe at any time.</p>
    <p>A typical newsletter might include a witness appeal for a road traffic collision, a CCTV image of a suspect we need to identify, a report about a local criminal sentenced at court, or a warning about a scam operating in your area.</p>
	<p>To sign up, simply type your email address below and click Subscribe.</p>
    <div class="ui-body ui-body-b">
	<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=nyp-news', 'popupwindow', 'scrollbars=yes');return true">
	  <label for="email" class="ui-hidden-accessible">Email:</label>
	  <input type="text" name="email" id="email" value="" placeholder="Email" />
	  <input type="hidden" value="nyp-news" name="uri" />
	  <input type="hidden" name="loc" value="en_US" />
	  <input type="submit" value="Subscribe" />
	</form>
	</div>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="craven">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Craven Safer Neighbourhood Command</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">
    <p>The Safer Neighbourhood Commander for Craven is Chief Inspector Simon Lovell.</p>
	<ul data-role="listview" data-inset="true">
      <li><a href="#twitter-craven"><img src="images/twitter.png" class="ui-li-icon">Team tweets</a></li>
    </ul>
	<ul data-role="listview" data-inset="true">
      <li><a href="html/police-stations.html"><img src="images/maps.png" class="ui-li-icon">Police stations</a></li>
	  <li><a href="html/meet-the-team.html"><img src="images/officers.png" class="ui-li-icon">Your local officers</a></li>
    </ul>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="hambleton-and-richmondshire">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Hambleton and Richmondshire Safer Neighbourhood Command</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">  
    <p>The Safer Neighbourhood Commander for Hambleton and Richmondshire is Superintendent Andy McMillan.</p>
	<ul data-role="listview" data-inset="true">
      <li><a href="#twitter-hambleton-and-richmondshire"><img src="images/twitter.png" class="ui-li-icon">Team tweets</a></li>
	</ul>
	<ul data-role="listview" data-inset="true">
      <li><a href="html/police-stations.html"><img src="images/maps.png" class="ui-li-icon">Police stations</a></li>
	  <li><a href="html/meet-the-team.html"><img src="images/officers.png" class="ui-li-icon">Your local officers</a></li>
    </ul>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="harrogate">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Harrogate Safer Neighbourhood Command</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">  
    <p>The Safer Neighbourhood Commander for Harrogate is Superintendent Barry Smith.</p>
	<ul data-role="listview" data-inset="true">
      <li><a href="#twitter-harrogate"><img src="images/twitter.png" class="ui-li-icon">Team tweets</a></li>
	</ul>
	<ul data-role="listview" data-inset="true">
      <li><a href="html/police-stations.html"><img src="images/maps.png" class="ui-li-icon">Police stations</a></li>
	  <li><a href="html/meet-the-team.html"><img src="images/officers.png" class="ui-li-icon">Your local officers</a></li>
    </ul>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="scarborough-and-ryedale">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Scarborough and Ryedale Safer Neighbourhood Command</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">  
    <p>The Safer Neighbourhood Commander for Scarborough is Superintendent Glyn Payne.</p>
	<ul data-role="listview" data-inset="true">
	  <li><a href="#twitter-scarborough-and-ryedale"><img src="images/twitter.png" class="ui-li-icon">Team tweets</a></li>
	</ul>
	<ul data-role="listview" data-inset="true">
      <li><a href="html/police-stations.html"><img src="images/maps.png" class="ui-li-icon">Police stations</a></li>
	  <li><a href="html/meet-the-team.html"><img src="images/officers.png" class="ui-li-icon">Your local officers</a></li>
    </ul>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="selby">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Selby Safer Neighbourhood Command</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">  
    <p>The Safer Neighbourhood Commander for Selby is Chief Inspector Mark Iveson.</p>
	<ul data-role="listview" data-inset="true">
      <li><a href="#twitter-selby"><img src="images/twitter.png" class="ui-li-icon">Team tweets</a></li>
	</ul>
	<ul data-role="listview" data-inset="true">
      <li><a href="html/police-stations.html"><img src="images/maps.png" class="ui-li-icon">Police stations</a></li>
	  <li><a href="html/meet-the-team.html"><img src="images/officers.png" class="ui-li-icon">Your local officers</a></li>
    </ul>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="york">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>York Safer Neighbourhood Command</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">  
    <p>The Safer Neighbourhood Commander for York is Superintendent Lisa Winward.</p>
	<ul data-role="listview" data-inset="true">
	  <li><a href="#twitter-york"><img src="images/twitter.png" class="ui-li-icon">Team tweets</a></li>		
	</ul>
	<ul data-role="listview" data-inset="true">
      <li><a href="html/police-stations.html"><img src="images/maps.png" class="ui-li-icon">Police stations</a></li>
	  <li><a href="html/meet-the-team.html"><img src="images/officers.png" class="ui-li-icon">Your local officers</a></li>
    </ul>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="twitter">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Twitter</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">
    <a class="twitter-timeline" data-dnt=true href="https://twitter.com/NYorksPolice/north-yorkshire-police" data-widget-id="296268946728943617">Tweets from @NYorksPolice/north-yorkshire-police</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  </div>
</div>

<div data-role="page" id="help">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>About</h1>
  </div>
  <div data-role="content">  
    <p>NYP mobile is a fast and easy way for you to find out what's happening in your area - and what your local Safer Neighbourhood Team is doing about it.</p>
    <ul data-role="listview" data-inset="true" data-divider-theme="d">
      <li data-role="list-divider">Further information</li>
      <li><a href="#tech">Technical information</a></li>
      <li><a href="mailto:tom.stirling@northyorkshire.pnn.police.uk?subject=NYP mobile feedback"><img src="images/email.png" class="ui-li-icon">Email feedback</a></li>
    </ul>
    <ul data-role="listview" data-inset="true" data-divider-theme="d">
      <li data-role="list-divider">Share NYP mobile</li>
      <li><a href="http://www.facebook.com/sharer.php?u=http://www.nyp.mobi">Share on Facebook</a></li>
      <li><a href="http://www.twitter.com/share?url=http://www.nyp.mobi">Share on Twitter</a></li>        
    </ul>
  </div>
</div>

<div data-role="page" data-add-back-btn="true" id="tech">
  <div data-role="header" data-position="fixed" data-theme="b">
    <h1>Technical information</h1>
	<a href="#home" data-icon="home" data-direction="reverse" data-iconpos="notext" class="ui-btn-right">Home</a>
  </div>
  <div data-role="content">  
    <p>NYP mobile v3 uses the following free, open source technologies. It cost nothing to develop.</p>
    <ul data-role="listview" data-inset="true" data-divider-theme="d">
      <li><a href="http://www.jquery.com">jQuery 1.7.1</a></li>
      <li><a href="http://www.jquerymobile.com">jQuery Mobile 1.2.0a1</a></li>
      <li><a href="http://www.zazar.net/developers/jquery/zrssfeed/">zRSSFeed 1.1.6</a></li>
      <li><a href="http://tweet.seaofclouds.com/">Tweet!</a></li>
      <li><a href="http://cubiq.org/add-to-home-screen">add2home 2.0.2</a></li>    
    </ul>
  </div>
</div>

</body>
</html>


